//
//  ZZRepairTimeTypeVC.m
//  新项目
//
//  Created by liGordon on 17/3/9.
//  Copyright © 2017年 刘耀宗. All rights reserved.
//

#import "ZZRepairTimeTypeVC.h"
#import "ZZRepairFistCostFVC.h"
@interface ZZRepairTimeTypeVC ()
@property (weak, nonatomic) IBOutlet UIImageView *insImg;
@property (weak, nonatomic) IBOutlet UIImageView *endImg;

@property (weak, nonatomic) IBOutlet UIImageView *recImg;


@end

@implementation ZZRepairTimeTypeVC

- (void)viewDidLoad {
    [super viewDidLoad];
   self.title = @"维修成本核算";
    [self.insImg setHidden:YES];
     [self.endImg setHidden:YES];
    [self.recImg setHidden:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)insuranceTimeClick:(id)sender {
    UIButton *btn=sender;
    if ([self.delegate respondsToSelector:@selector(sendDataWithStr:)]) {
        if (btn.tag==300) {
              [self.delegate sendDataWithStr:@"保修时间"];
        }else if (btn.tag==301)
        {
        [self.delegate sendDataWithStr:@"结算时间"];
        }else if (btn.tag==302)
        {
        [self.delegate sendDataWithStr:@"收款时间"];
        }
      
        [self.navigationController popViewControllerAnimated:YES];

    }
    
}


    //[self.navigationController popViewControllerAnimated:YES];
 // }


- (IBAction)endCaculateTimeClick:(id)sender {
    [self.insImg setHidden:YES];
    [self.endImg setHidden:NO];
    [self.recImg setHidden:YES];
    if (self.navigationController.viewControllers.count >2) {
        ZZRepairFistCostFVC *vc =  self.navigationController.viewControllers[self.navigationController.viewControllers.count-2];
        vc.timeTypeStr = @"2";
        self.timeTypeShow = @"结算时间";
        self.changeText_block(self.timeTypeShow);
        [self.navigationController popToViewController:vc animated:YES];
   
    }

}
- (IBAction)receiveMoneyTimeClick:(id)sender {
    [self.insImg setHidden:YES];
    [self.endImg setHidden:YES];
    [self.recImg setHidden:NO];
    NSLog(@"%@",self.navigationController.viewControllers);
    if (self.navigationController.viewControllers.count >1) {
        ZZRepairFistCostFVC *vc =  self.navigationController.viewControllers[self.navigationController.viewControllers.count-1];
        vc.timeTypeStr = @"3";
        self.timeTypeShow = @"收款时间";
        self.changeText_block(self.timeTypeShow);
        [self.navigationController popToViewController:vc animated:YES];
    }
}



@end
